﻿using Sunny.UI;
using System;

namespace CoreShop.App
{
    public partial class UIPaymentItem : UIUserControl
    {
        public UIPaymentItem()
        {
            InitializeComponent();
        }

        public UIPaymentItem(string name, string value, string button = "")
        {
            InitializeComponent();

            btn.Visible = button.IsValid();
            btn.Text = button;
            lblName.Text = name;
            lblValue.Text = value;
        }

        public event EventHandler ButtonClick;

        private void btn_Click(object sender, System.EventArgs e)
        {
            ButtonClick?.Invoke(this, e);
        }
    }
}
